package ua.maxicash.vo;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.hibernate.annotations.*;

import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Set;

@Entity
@Table(name = "Country")
@JsonIgnoreProperties({"regions"})
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class Country {

	@Id
	@Column(name = "ID_COUNTRY")
	@GeneratedValue
	private Long idCountry;

	@Column(name = "country_name_ru")
	private String ruName;

	@Column(name = "country_name_en")
	private String enName;

//    @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
//    @JoinColumn(name = "ID_COUNTRY")
//    private Set<Region> regions;

	public Country() {
	}

	public Long getIdCountry() {
		return idCountry;
	}

	public void setIdCountry(Long idCountry) {
		this.idCountry = idCountry;
	}

	public String getRuName() {
		return ruName;
	}

	public void setRuName(String ruName) {
		this.ruName = ruName;
	}

	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

    public Set<Region> getRegions() {
     //   return regions;
        return null;
    }

    public void setRegions(Set<Region> regions) {
        //this.regions = regions;
    }

	@Override
	public String toString() {
		return "Country [idCountry=" + idCountry + ", ruName=" + ruName
				+ ", enName=" + enName + "]";
	}
    
    
}
